package org.benxiong.iplay.type;

public enum MessageType {
	TEXT(0),
	LOCATION(1),
	IMAGE(2),
	VOICE(3),
	LONG_TEXT(4),
	INTERNAL_PHOTO(5),
	PRIVATE_PHOTO(6),
	PLACE_LOCATION(7),

	INTERNAL_EMOTION(10),
	EXTERNAL_EMOTION(11),

	UNLOCK(100),
	MEETUP(101);

	private int	position;

	private MessageType(int position) {
		this.position = position;
	}

	public int getPosition() {
		return this.position;
	}

	public static MessageType getValue(int position) {
		for (MessageType tt : MessageType.values()) {
			if (tt.getPosition() == position)
				return tt;
		}
		return null;
	}
}
